package com.dshore.messagecenter.service.technology.impl;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dshore.messagecenter.dao.technology.TimerTaskDao;
import com.dshore.messagecenter.service.technology.TimerTaskService;
import com.dshore.messagecenter.util.UUIDUtil;
@Service
public class TimerTaskServiceImpl implements TimerTaskService {
	@Autowired
	private TimerTaskDao timerTaskDao;
	
	@Override
	public Integer addData() {
		Date d=new Date();
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String time=sdf.format(d);
		Map<String,Object> m=new HashMap<>();
		m.put("time", time);
		m.put("id", UUIDUtil.getUUId());
		m.put("data", "爱我中华");
		Integer a=timerTaskDao.addData(m);
		return a;
	}

}
